import request from '@/utils/request'

// 查询药品申领主记录列表 (分页)
export function selectPageDrugApplyFor(query) {
  return request({
    url: '/drug/drugApplyFor/selectPage',
    method: 'get',
    params: query
  })
}

// 查询药品申领主记录列表 (不分页)
export function listDrugApplyFor(query) {
  return request({
    url: '/drug/drugApplyFor/list',
    method: 'get',
    params: query
  })
}

// 查询药品申领主记录详细
export function getDrugApplyFor(applyForId) {
  return request({
    url: '/drug/drugApplyFor/' + applyForId,
    method: 'get'
  })
}

// 新增药品申领主记录
export function addDrugApplyFor(data) {
  return request({
    url: '/drug/drugApplyFor',
    method: 'post',
    data: data
  })
}

// 修改药品申领主记录
export function updateDrugApplyFor(data) {
  return request({
    url: '/drug/drugApplyFor',
    method: 'put',
    data: data
  })
}

// 删除药品申领主记录
export function delDrugApplyFor(applyNo) {
  return request({
    url: '/drug/drugApplyFor/' + applyNo,
    method: 'delete'
  })
}

// 删除申领主记录
export function delDrugApplyForByApplyNo(applyNo, orgId) {
  return request({
    url: '/drug/drugApplyFor/delDrugApplyForByApplyNo/' + applyNo + "/" + orgId,
    method: 'delete'
  })
}
